<?php $this->load->view('navmenu');?>
<script type="text/javascript" charset="utf-8">
    // dynamic table
    jQuery('#dyntable').dataTable({
    "sPaginationType": "full_numbers",
    "aaSortingFixed": [[0,'asc']],
    "fnDrawCallback": function(oSettings) {
    jQuery.uniform.update();
    }
    });
</script>
<div class="maincontent">
        	<div class="contentinner">
                	<center><?php echo $this->session->flashdata('msg'); ?></center>
				 <ul class="list-nostyle list-inline">
                                            <li><a href="<?php echo base_url();?>index.php/project/addProject" class="btn btn-info btn-rounded"><i class="iconfa-off"></i> Add New</a></li>
                                        </ul>
            	<h4 class="widgettitle">Work Progress</h4>
            	<table class="table table-bordered" id="dyntable">
                    <thead>
                        <tr>
                            <th class="center">No</th>
                            <th class="center">Nama Project</th>
                            <th class="center">Tanggal</th>
                            <th class="center">Action</th>
                        </tr>
                    </thead>
                    <tbody>
					<?php $i=1;?>
					<?php foreach($threads as $row):?>
                        <tr class="gradeX">
                            <td class="center"><?=$i?></td>
                            <td class="center"><?=$row['nama_project']?></td>
                            <td class="center"><?=$row['tanggal']?></td>
                            <td class="center"><a href="<?php echo base_url();?>index.php/project/ThreadList/<?=$row['id_project']?>"/><i class="btn btn-info btn-rounded">Check Project</i></a> | <a href="<?php echo base_url();?>index.php/projects/showThread/<?=$row['id_project']?>"><i class="btn btn-danger btn-rounded">Delete Project</i></a></a></td>
                        </tr>
					<?php $i++;endforeach; ?>
                    </tbody>
                </table>
            </div><!--contentinner-->
        </div><!--maincontent-->